package com.yang.leather.mall.action;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;

import com.yang.leather.admin.action.BaseAction;
import com.yang.leather.admin.pojo.Language;
import com.yang.leather.admin.pojo.ProdType;
import com.yang.leather.admin.service.IProdTypeService;

public class MallBaseAction extends BaseAction{

	private static final long serialVersionUID = 1L;
	
	protected IProdTypeService prodTypeService;
	
	public void loadCommonInfo(){
		List<ProdType> lstTypes = this.prodTypeService.getAllProdTypes();
		this.getRequest().setAttribute("lstTypes", lstTypes);
		
		this.getRequest().setAttribute("languages", Language.getLanguage());
	}
	
	public IProdTypeService getProdTypeService() {
		return prodTypeService;
	}

	@Autowired
	public void setProdTypeService(@Qualifier("prodTypeService")
			IProdTypeService prodTypeService) {
		this.prodTypeService = prodTypeService;
	}

}
